package com.xmcowell.sportpacemaster.utils.retrofit;

public class HttpResult<T> {

    private int resultstate;
    private String message;
    private T outbo;
    public String resulttype;

    public boolean isSuccess() {
//        if(outbo == null)
//            return false;
        return resultstate == Constant.SUCCESS;
    }

//    public boolean isEmpty() {
//        return resultstate == Constant.EMPTY;
//    }
//
//    public boolean isNoMore() {
//        return resultstate == Constant.NOMORE;
//    }

    public int getResultstate() {
        return resultstate;
    }

    public void setResultstate(int resultstate) {
        this.resultstate = resultstate;
    }

    public T getDatasource() {
        return outbo;
    }

    public void setDatasource(T datasource) {
        this.outbo = datasource;
    }

    public String getMessage() {
        return "[" + resulttype + "]" + message;
    }
    public String getMsg(){
        return message;
    }
    public String getResultType(){
        return "[" + resulttype + "]"+" API error,Please Call Administer";
    }

    public void setMessage(String message) {
        this.message = message;
    }
}